#ifndef OPDISPATCHER_H
#define OPDISPATCHER_H

#include <QVector>

#include "ip/opdef.h"
#include "ip/fabrics.h"

#include "node.h"

class OpDispatcher : public Node
{
public:
    explicit OpDispatcher(Node *parent, const QString &path, bool visual);
    QVector<AllocOp> getAops() const;

    NodeTaskList tasks() const override;

    void task_dispatch();

    QVector<AllocOp> aops;
    QVector<TranOp> tops;
    QVector<ExecOp> eops;

    ChannelTranOpFabricSender *top_sender;
    ChannelExecOpFabricSender *eop_sender;

    int top_pointer, eop_pointer;
    bool visual;
};

#endif // OPDISPATCHER_H
